package com.weixin.entity;

import java.util.Date;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.weixin.common.BaseEntity;

public class BgUser extends BaseEntity implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;

	// date formats
	public static final String FORMAT_DCREATE_TIME = DATE_FORMAT;

	/**
	 * nuserId db_column: nUserId
	 */
	private java.lang.Integer nuserId;
	/**
	 * saccount db_column: sAccount
	 */
	private java.lang.String saccount;
	/**
	 * spassword db_column: sPassword
	 */
	private java.lang.String spassword;
	/**
	 * sname db_column: sName
	 */
	private java.lang.String sname;
	/**
	 * 1-管理人员；2-商务人员；3-厂家用户；4-CP用户 db_column: nType 5-运营人员
	 * 11-微信用户
	 */
	private Integer ntype;
	/**
	 * 1-男；2-女；3-未知 db_column: nSex
	 */
	private Integer nsex;
	/**
	 * sqq db_column: sQQ
	 */
	private java.lang.String sqq;
	/**
	 * semail db_column: sEmail
	 */
	private java.lang.String semail;
	/**
	 * smobile db_column: sMobile
	 */
	private java.lang.String smobile;
	/**
	 * stel db_column: sTel
	 */
	private java.lang.String stel;
	/**
	 * sfax db_column: sFax
	 */
	private java.lang.String sfax;
	/**
	 * szip db_column: sZip
	 */
	private java.lang.String szip;
	/**
	 * saddress db_column: sAddress
	 */
	private java.lang.String saddress;
	/**
	 * sbrief db_column: sBrief
	 */
	private java.lang.String sbrief;
	/**
	 * 1-有效；2-无效 db_column: nIsValid
	 */
	private Integer nisValid;
	/**
	 * 取当前时间 db_column: dCreateTime
	 */
	private Date dcreateTime;
	/**
	 * isProxy db_column: is_proxy
	 */
	private java.lang.Integer isProxy;
	private String nroleId;
	private java.lang.String sunPassword;
	// columns END

	private String sAccountMapping;

	// 注意： spring_jdbc的MetadataCreateUtils.fromTable(Entity.class) 可以读取JPA
	// annotation的标注信息
	// 现支持 @Id,@Column,@Table标注

	public BgUser() {
	}

	public BgUser(java.lang.Integer nuserId) {
		this.nuserId = nuserId;
	}

	public java.lang.Integer getNuserId() {
		return this.nuserId;
	}

	public void setNuserId(java.lang.Integer value) {
		this.nuserId = value;
	}

	public java.lang.String getSaccount() {
		return this.saccount;
	}

	public void setSaccount(java.lang.String value) {
		this.saccount = value;
	}

	public java.lang.String getSpassword() {
		return this.spassword;
	}

	public void setSpassword(java.lang.String value) {
		this.spassword = value;
	}

	public java.lang.String getSname() {
		return this.sname;
	}

	public void setSname(java.lang.String value) {
		this.sname = value;
	}

	public Integer getNtype() {
		return this.ntype;
	}

	public void setNtype(Integer value) {
		this.ntype = value;
	}

	public Integer getNsex() {
		return this.nsex;
	}

	public void setNsex(Integer value) {
		this.nsex = value;
	}

	public java.lang.String getSqq() {
		return this.sqq;
	}

	public void setSqq(java.lang.String value) {
		this.sqq = value;
	}

	public java.lang.String getSemail() {
		return this.semail;
	}

	public void setSemail(java.lang.String value) {
		this.semail = value;
	}

	public java.lang.String getSmobile() {
		return this.smobile;
	}

	public void setSmobile(java.lang.String value) {
		this.smobile = value;
	}

	public java.lang.String getStel() {
		return this.stel;
	}

	public void setStel(java.lang.String value) {
		this.stel = value;
	}

	public java.lang.String getSfax() {
		return this.sfax;
	}

	public void setSfax(java.lang.String value) {
		this.sfax = value;
	}

	public java.lang.String getSzip() {
		return this.szip;
	}

	public void setSzip(java.lang.String value) {
		this.szip = value;
	}

	public java.lang.String getSaddress() {
		return this.saddress;
	}

	public void setSaddress(java.lang.String value) {
		this.saddress = value;
	}

	public java.lang.String getSbrief() {
		return this.sbrief;
	}

	public void setSbrief(java.lang.String value) {
		this.sbrief = value;
	}

	public Integer getNisValid() {
		return this.nisValid;
	}

	public void setNisValid(Integer value) {
		this.nisValid = value;
	}

	// @Transient
	// public String getDcreateTimeString() {
	// return DateConvertUtils.format(getDcreateTime(), FORMAT_DCREATE_TIME);
	// }
	// public void setDcreateTimeString(String value) {
	// setDcreateTime(DateConvertUtils.parse(value,
	// FORMAT_DCREATE_TIME,java.util.Date.class));
	// }


	public java.lang.Integer getIsProxy() {
		return this.isProxy;
	}

	public void setIsProxy(java.lang.Integer value) {
		this.isProxy = value;
	}

	public java.lang.String getSunPassword() {
		return this.sunPassword;
	}

	public void setSunPassword(java.lang.String value) {
		this.sunPassword = value;
	}

	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append("NuserId", getNuserId()).append("Saccount",
						getSaccount()).append("Spassword", getSpassword())
				.append("Sname", getSname()).append("Ntype", getNtype())
				.append("Nsex", getNsex()).append("Sqq", getSqq()).append(
						"Semail", getSemail()).append("Smobile", getSmobile())
				.append("Stel", getStel()).append("Sfax", getSfax()).append(
						"Szip", getSzip()).append("Saddress", getSaddress())
				.append("Sbrief", getSbrief())
				.append("NisValid", getNisValid()).append("DcreateTime",
						getDcreateTime()).append("IsProxy", getIsProxy())
				.append("SunPassword", getSunPassword()).toString();
	}

	public int hashCode() {
		return new HashCodeBuilder().append(getNuserId()).toHashCode();
	}

	public boolean equals(Object obj) {
		if (obj instanceof BgUser == false)
			return false;
		if (this == obj)
			return true;
		BgUser other = (BgUser) obj;
		return new EqualsBuilder().append(getNuserId(), other.getNuserId())
				.isEquals();
	}

	public String getNroleId() {
		return nroleId;
	}

	public void setNroleId(String nroleId) {
		this.nroleId = nroleId;
	}

	public String getSAccountMapping() {
		return sAccountMapping;
	}

	public void setSAccountMapping(String accountMapping) {
		sAccountMapping = accountMapping;
	}

	public Date getDcreateTime() {
		return dcreateTime;
	}

	public void setDcreateTime(Date dcreateTime) {
		this.dcreateTime = dcreateTime;
	}

}
